Icon Hunter has been written in response to an article in the Acorn User magazine. A reader complained that he had found some new icons, added them to his existing library of icons, only to find some old icons were still seen.
The problem is that some programs overwrite the standard icons and replace them with there own. Often, the change can be seen when you load the program. However, sometimes you do not notice this because the two icons are identical.
Icon Hunter will take the default set of icons and search through your applications, removing any duplicate copies it finds.
Usage
——-
Load !IconHunt in the usual way by double-clicking on its icon in the Filer window. Click on the icon bar icon which has just appeared to open the main dialogue box.
You need to find your default sprite file. It may be located in one of several places:
• Middle button on ‘Apps’ and choose Open ‘$’, then choose ‘Resources’, then ‘WIMP’
• Look inside !SetIcons on your hard disc for a file called ‘22Sprites’
Drag the sprite file onto the ‘Master Spritefile’ arrow or enter the pathname in the box below.
Do the same for the directory or application you wish to be searched by dragging it to the ‘Search directory’ arrow.
If you think you will need to look at the icons during the search, choose either or both of the ‘View when necessary’ options.
If you want a logfile to be created, choose ‘Make logfile’ and drag the file icon to a filer window. ‘Open when done’ will automatically display the logfile after the search process is complete.
Choose the action you require:
Enter into log only Do not alter any sprite files, simply make a note of all duplicate sprites.
Prompt The program will pause and you will be asked what action you wish to take every time a duplicate sprite is encountered.
Keep master, delete duplicate Remove the sprite from the offending application’s sprite file.
Delete master, leave duplicate Remove the sprite from the master file.
Rename The program will attempt to rename the sprite. You have great control over how the computer does this. See “Renaming a Sprite”.
Note that ‘Enter into log only’ can only be chosen when you have the ‘Make logfile’ option selected.
An additional option, ‘Search !Sprites only’, will only look at sprite files whose names are ‘!Sprites’, ‘!Sprites22’ or ‘!Sprites23’. This is useful to speed things up as it is usually only files with these names that will have duplicate sprites.
Click on ‘Start’ to begin the search. The main dialogue box closes and a progress box opens. You can pause or abort at any time by pressing the corresponding button. Some icons may be shaded depending on your chosen action.
If you chose ‘Prompt’ in the main dialogue box, the computer asks you what action you want to take for each duplicate icon it finds. Simply choose ‘Rename’, ‘Delete duplicate’, ‘Delete master’ or ‘Ignore’ when asked for a response.
+————————————————————+
| Icon Hunter |
+————————————————————+
|Action for duplicate sprites ‘file_ffb’?|
| ADFS::HardDisc.$.!ChangeFSI.!Sprites22|
+————+—————+—————+————-+
| Abort | Rename | Prompt | Ignore |
+————+—————+—————+————-+
| Delete duplicate | Delete master |
+—————————-+—————+————-+
If you chose an action other than ‘Prompt’, this action will be executed automatically. Click on prompt at any time during the search to make sure you are asked in every future occurrence of a duplicate sprite. If you decided to ‘View when necessary’, the sprite files will be displayed for you so that you can choose which icon to keep. The Icon Hunter progress box will remain visible so you can make your choice.
Renaming Sprites
————————
This option gives allows you to keep the master or duplicate but change its name. Choose whether you want to rename the master or the duplicate by choosing the appropriate option at the bottom right corner of the main dialogue box. You can either rename to a fixed name of your choice, or alter the sprite’s existing name using a prefix and/or suffix.
Choose the ‘Fixed’ option is not always a good idea; if there are several duplicates in one sprite file, the program will tell you that it cannot rename the sprite. This is far less likely to happen when using the ‘Prefix’ and/or ‘Suffix’ options.
Other Options
——————-
You can save your choices that you have chosen in the main window by clicking on ‘Save settings’. This way Icon Hunter will always initialise with your preferences.
Compatibility
——————-
!IconHunt will work with RISC OS 3.1 and above. It is not guaranteed to work with RISC OS 4, however.
Its memory requirement will depend on the size of spritefiles it encounters. However, it needs a minimum of 160K.
Updates
———-
This program will be updated periodically. This, however, depends on feedback from you to help me improve this program for yourself and other users.
!Help and message files
———————————-
This application is fully !Help compliant and it is recommended that when getting to grips with it the help is highly recommended. It also supports the use of ‘MessageTrans’ and therefore translation to another language is easy. Hold down Shift and double-click on !IconHunt. You may alter the ‘Messages’ file as you wish.
JFShared
————
This application requires Justin Fletcher’s JFShared library to function. This can be obtained from Arcade and possibly other bulletin boards. A version is currently being carried by Hensa, but for the latest version you would be best off looking at Justin’s web page (see below), or contacting him by one of the other means below. You can also request a copy of JFShared by mailing Justin with the subject set to ‘Send: jfshared’ without the quotes.
Technical
————-
IconHunt contains some routines that some programmers may find useful.
You can stop the line numbering by commenting out line 6950.
Contain within the ‘Meaty bit’ are heap management routines (I didn’t find Gerph’s easy enough!) and binary tree sort and search algorithms. Please feel free to use them in your own applications. See the ‘Technical’ file for explanations of how to use them.
Disclaimer
—————
The author accepts no responsibility for any problems which this application may cause or loss of data resulting in its use. This application is Public Domain software. This means that it may be distributed, so long as no charge other than copying costs are charged for it.
The copyright for !JFShared remains with Justin Fletcher.
Contact
———-
Any comments, queries or problems can be reported to James Shaw at:
E-Mail : 10077@tbgs.torbay.sch.uk (valid until June 2001)
Web : Coming soon (look at www.eclipse.co.uk/doubletake for a link)
Credits for the basic library ‘JFShared’ go to Justin Fletcher: